import request from '@/api/request'

export function login(data) {
  return request({
    url: '/login',
    method: 'post',
    data
  })
}

export function logout() {
  return request({
    url: '/logout',
    method: 'post',
  })
}

// 获取加密公钥
export function getPublicKey() {
  return request({
    url: '/public-key',
    method: 'get',
  })
}

// 修改密码
export function changePwd(data) {
  return request({
    url: '/user',
    method: 'post',
    data,
  })
}